package com.gitee.wsl.net.server.role

import io.ktor.server.auth.Principal

class RoleBasedAuthPluginConfiguration {
    var roleExtractor: ((Principal) -> Set<Role>) = { emptySet() }
        private set

    fun extractRoles(extractor: (Principal) -> Set<Role>) {
        roleExtractor = extractor
    }
    var throwErrorOnUnauthorizedResponse = false
}